#!/usr/bin/bash 

while read line; do
    old_dir=`echo $line | cut -d "," -f2`
    new_dir=`echo $line | cut -d "," -f1`
    if [ -d "$old_dir" ]; then
        mv $old_dir $new_dir
    fi
done < name.csv
